package com.journey.org.ui.home

import android.os.Bundle
import com.journey.org.entity.ArticleEntity
import com.journey.org.entity.WeekHottestEntity
import com.journey.org.ui.web.WebActivity
import com.mvvmhabit.org.base.MultiItemViewModel
import com.mvvmhabit.org.binding.command.BindingAction
import com.mvvmhabit.org.binding.command.BindingCommand

/**
 * @Date: 2020/11/17 15:32
 * @Author:小妖
 * @Description: RecycleView 的item
 */
class HomeItemViewModel(vm: HomeViewModel, val entity: ArticleEntity) :
    MultiItemViewModel<HomeViewModel>(vm) {

    val onEnterDetailCommand = BindingCommand<Any>(object : BindingAction {
        override fun call() {
//            val bundle = Bundle()
//            bundle.putString("loadUrl", "https://gank.io/post/" + entity.id)
//            bundle.putString("title", entity.articleTitle)
//            viewModel.startActivity(WebActivity::class.java, bundle)
        }
    })

}